package methodFactory;

import simpleFactory.Pizza;

/**
 * @projectName: com.xiayuanxing.designPattern
 * @className: BJOrderPizza
 * @author: xiayuanxing
 * @description: TODO
 * @date: 2021/12/16 16:09
 * @version: 1.0
 */
public class BJOrderPizza extends OrderPizza{

    @Override
    Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if (orderType.equals("cheese")){
            pizza = new BJCheesePizza();
        }else if (orderType.equals("pepper")){
            pizza = new BJPepperPizza();
        }
        return pizza;
    }
}
